package com.cuong004.android.FallDetector;

import java.util.ArrayList;
import java.util.zip.Inflater;

import com.example.android.navigationdrawerexample.R;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class AdapterForNavigation extends BaseAdapter {
	
	public AdapterForNavigation(String[] mPlanetTitles, Context context) {
	    super();
	    this.items = mPlanetTitles;
	    this.context = context;
	}
	String[] items;
	private Context context;
	
	public AdapterForNavigation() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return items.length;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@SuppressLint("ResourceAsColor")
	@Override
	public View getView( final int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		View v = convertView;
		LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		v = inflater.inflate(R.layout.drawer_list_item, null);
		TextView tt = (TextView) v.findViewById(R.id.tv1);
        tt.setTextColor(R.color.black);
        tt.setText(items[position]);
		return v;
	}

}
